/*
 * @Author: your name
 * @Date: 2021-01-09 17:16:13
 * @LastEditTime: 2021-01-27 14:22:57
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \wxapp\pages\vehicle\index\index.js
 */
Page({
    data: {
        navs: [{
            imageSrc: '/static/images/icon.png',
            title: '主动预约',
            subTitle: '免费预约少排队'
        }, {
            imageSrc: '/static/images/icon.png',
            title: '上门预约',
            subTitle: '足不出户上门办'
        }, {
            imageSrc: '/static/images/icon.png',
            title: 'VIP预约',
            subTitle: '贵宾专享VIP'
        },],
        service: [
            {
                imageSrc: '/static/images/icon.png',
                title: '联系客服',
            },
            {
                imageSrc: '/static/images/icon.png',
                title: '违章查询',
            },
            {
                imageSrc: '/static/images/icon.png',
                title: '车辆预约',
            },
        ],
        showModal: false,
    },
    noop() { },
    // 上线年检&六年免签
    onClickShow(e) {
        switch (e.currentTarget.dataset.id) {
            // 显示modal
            case "1":
                /*this.setData({
                    showModal: true
                })*/
                wx.navigateTo({
                    url: "/pages/vehicle/index/six-ex-inspect/six-ex-inspect?id=12"
                })
                break;
            // 跳转
            case "2":
                wx.navigateTo({
                    url: "/pages/vehicle/index/six-ex-inspect/six-ex-inspect?id=13"
                })
                break;
        }
    },
    tapServiceItem(e) {
        let index = e.currentTarget.dataset.index;
        if (index == 0) {
            wx.navigateTo({
                url: '/pages/vehicle/person/custom-service/custom-service'
            })
        } else if (index == 1) {
            wx.navigateToMiniProgram({
                appId: 'wxc75701fc4a336034'
            })
        } else {
            wx.switchTab({url:'/pages/vehicle/shop/shop'})
        }
    },
    onClickHide() {
        this.setData(
            {
                showModal: false
            }
        )
    },
    driveSelfClick(e) {
        let url = "/pages/vehicle/index/six-ex-inspect/six-ex-inspect";
        wx.navigateTo({
            url: url,
        });
    },
})